home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 015a / unique2.zip / UNIQUE.DOC < prev   
Text File  |  1991-04-22  |  2KB  |  40 lines

  1. UNIQUE.COM
  2.  
  3. Replaces one of the batch file parameters (%1 - %9) with an 8 character 
  4. unique file name (i.e. the name of a file that does not already exist in 
  5. the current directory).  Unique does not create the file, it just finds 
  6. a name.
  7.  
  8. USAGE:   UNIQUE n   where n is the number of the parameter to be replaced
  9.  
  10. An example of a batch file that uses unique follows:
  11.  
  12.     ECHO OFF
  13.     ...
  14.     REM  Some batch statements
  15.     ...
  16.     UNIQUE 2
  17.     COPY OldData %2
  18.     ...
  19.     REM  Some more batch statements
  20.     ...
  21.     TYPE %2
  22.     DEL %2
  23.  
  24. The command line statement calling this batch file would look something like:
  25.  
  26.     DOBATCH Parameter1 12345678 AnotherParameter
  27.  
  28. The parameter 12345678 is a dummy parameter that will be replaced by the
  29. unique file name.  It must be 8 characters long.  When the batch file gets
  30. to the line 'UNIQUE 2' Unique executes and replaces the second parameter on
  31. the command line with the unique file name.  If the second parameter does not
  32. exists or is not 8 characters long then Unique aborts with an error message.
  33. After this line has been executed %2 contains the unique name so 
  34. 'COPY OldDate %2' copys the file OldData to the unique file found by Unique.
  35.  
  36. ERRORLEVELs returned are:  1 - No parameter # specified
  37.                            2 - Parameter # specifed does not exists
  38.                            3 - Parameter # specifed is not 8 characters long
  39.                            4 - A unique file name could not be found
  40.